coordinate_system Derived Type

type, public :: coordinate_system

Defines a 3D Cartesian coordinate system.


Contents


Components

Type Visibility Attributes Name Initial
real(kind=real64), public :: i(3)

The unit vector along the coordinate system's x-axis.

real(kind=real64), public :: j(3)

The unit vector along the coordinate system's y-axis.

real(kind=real64), public :: k(3)

The unit vector along the coordinate system's z-axis.

real(kind=real64), public :: origin(3)

The location of the origin of the coordinate system in the parent coordinate system.


Constructor

public interface coordinate_system

  • private pure function define_link_csys(xim1, zim1, zi, rim1, ri) result(rst)

    Defines the DH coordinate system for the specified link. The axes are normalized and the axis is selected along the common normal of the two joint axes. For intersecting axes,

    Arguments

    Type IntentOptional Attributes Name
    real(kind=real64), intent(in) :: xim1(3)

    The x-axis of the previous link.

    real(kind=real64), intent(in) :: zim1(3)

    The z-axis of the previous link. This is also the axis of the proximal joint of the current link.

    real(kind=real64), intent(in) :: zi(3)

    The axis of the distal joint of the current link.

    real(kind=real64), intent(in) :: rim1(3)

    The location of the proximal joint's center or home position.

    real(kind=real64), intent(in) :: ri(3)

    The location of the distal joint's center or home position.

    Return Value type(coordinate_system)

    The resulting coordinate system.

  • private pure function define_csys(i, j, k, o) result(rst)

    Defines a new coordinate_system object. It is the callers responsibility to ensure that the supplied vectors are orthogonal to one another.

    Arguments

    Type IntentOptional Attributes Name
    real(kind=real64), intent(in) :: i(3)

    The x-axis unit vector.

    real(kind=real64), intent(in) :: j(3)

    The y-axis unit vector.

    real(kind=real64), intent(in) :: k(3)

    The x-axis unit vector.

    real(kind=real64), intent(in), optional :: o(3)

    The location of the coordinate system within a reference coordinate system. If not supplied, a value of (0, 0, 0) will be used.

    Return Value type(coordinate_system)

    The new coordinate_system object.